You are here: FAQ > FAQ Common to Both Documaker Editions > Documaker Studio Issues > How do I get a list of the TerSub section names selected by a DAL script?

How do I get a list of the TerSub section names selected by a DAL script?

You can do this by associating another field with the TerSub field. When you do this, the paragraphs you select are assigned to that field. The paragraphs are separated with a semicolon. You can then use DAL to get those values and parse the names.

To keep TerSub selections, set the data token as shown here:

;K= xxx

Where xxx represents a variable field you must add to your form. This variable field must be alphanumeric and be marked as Hidden and No User Edit to prevent it from displaying or printing on your form. This field should not exceed 1024 characters. Make it long enough to handle the number of paragraphs or names you expect the user to pick.

The system uses this field to store the items selected from the Paragraph Selection window. This field should follow the multiline text field. Here is an example:

;K=Selections

where Selections is the name of a second variable field on your form. During testing, you would probably want to see the field. To later hide it from users, mark it as Hidden and No User Edit.

When you tab off the multiline text variable field and then back tab into it, the Paragraph Selection window shows whatever items you selected previously in the Selected Paragraphs section of the Paragraph Selection window.

Begin all token flags with a semicolon. The Data field may contain multiple token flags in a series, such as:

;ZS;NE

Any text occurring before the first flag should be assumed to be the old parameter supporting an insertion field point.

In the FAP file that names the TerSub, append a semicolon to the data followed by...

K=field name

where you name the field added to receive the selections. In your DAL script, get the value of this field and parse the individual names using string functions.